package boot

import (
	"background/library/adapter"
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/os/glog"
)

func init() {
	InitRedis()
	go InitLog()
}

func InitRedis() {
	adapter := adapter.NewRedis(g.Redis("cache"))
	g.DB().GetCache().SetAdapter(adapter)
}

func InitLog() {
	path := g.Config().GetString("logger.Path")
	glog.SetPath(path)
}
